#pragma config(I2C_Usage, I2C1, i2cSensors)
#pragma config(Sensor, in1,    POT,            sensorPotentiometer)
#pragma config(Sensor, in8,    Gyro,           sensorGyro)
#pragma config(Sensor, dgtl1,  pneu1,          sensorDigitalOut)
#pragma config(Sensor, dgtl2,  pneu2,          sensorDigitalOut)
#pragma config(Sensor, dgtl3,  pneu3,          sensorDigitalOut)
#pragma config(Sensor, dgtl4,  pneu4,          sensorDigitalOut)
#pragma config(Sensor, dgtl5,  touchl,         sensorTouch)
#pragma config(Sensor, dgtl6,  touchh,         sensorTouch)
#pragma config(Sensor, dgtl7,  button,         sensorTouch)
#pragma config(Sensor, I2C_2,  ,               sensorQuadEncoderOnI2CPort,    , AutoAssign)
#pragma config(Motor,  port1,           right3,        tmotorVex393, openLoop, reversed, encoder, encoderPort, I2C_2, 1000)
#pragma config(Motor,  port2,           right1,        tmotorVex269, openLoop, reversed)
#pragma config(Motor,  port3,           right2,        tmotorVex269, openLoop, reversed)
#pragma config(Motor,  port4,           left1,         tmotorVex269, openLoop)
#pragma config(Motor,  port5,           left2,         tmotorVex269, openLoop)
#pragma config(Motor,  port6,           rightLift,     tmotorVex393, openLoop)
#pragma config(Motor,  port7,           leftLift,      tmotorVex393, openLoop, reversed)
#pragma config(Motor,  port8,           Collectors1,   tmotorVex269, openLoop)
#pragma config(Motor,  port9,           Collectors2,   tmotorVex269, openLoop, reversed)
#pragma config(Motor,  port10,          left3,         tmotorVex393, openLoop, encoder, encoderPort, I2C_2, 1000)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

#pragma platform(VEX)
#pragma competitionControl(Competition)
#pragma autonomousDuration(20)
#pragma userControlDuration(120)

#include "Vex_Competition_Includes.c"   //Main competition background code...do not modify!
#include "Variables.c"
#include "Gyrolib.c"
#include "Encoderlib.c"
#include "Armlib.c"
#include "TaskLib.c"
#include "func.c"
#include "LCD.c"

void pre_auton()  {
  // Set bStopTasksBetweenModes to false if you want to keep user created tasks running between
  // Autonomous and Tele-Op modes. You will need to manage all user created tasks if set to false.
  bStopTasksBetweenModes = true;
  clearEncoder();
  // ClearGyro();n,
  Autonchooser();//choose LCD function.
}

task autonomous()  {

Autonfilter();  {


    if(Isolation_RED_Program == 1)
    {
    BlockMiddleGoal();
    }
    else if(Isolation_RED_Program == 2)
    {
    BlockMiddleGoal(); //do this thing
    }
    else if(Isolation_RED_Program == 3)
    {
    BlockMiddleGoal();// do this
    }
    else if (Isolation_BLUE_Program == 1)
    {
    BlockMiddleGoal();
    }
    else if(Isolation_BLUE_Program == 2)
    {
    BlockMiddleGoal();
    }
    else if(Isolation_BLUE_Program == 3)
    {
    BlockMiddleGoal();
    }
    else if(Interaction_RED_Program == 1)
    {
    drive_Highgoal();//do this
    }
    else if(Interaction_RED_Program == 2)
    {
    drive_Highgoal();//do this
    }
    else if(Interaction_RED_Program == 3)
    {
    drive_Highgoal();//do this
    }
    else if(Interaction_BLUE_Program == 1)
    {
    drive_Highgoal();//do this
    }
  }
}

task usercontrol()
{
#include"Teleop.c"
}
